home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 3
/
003.d81
/
dos part 4
< prev
next >
Wrap
Text File
|
2022-08-26
|
3KB
|
159 lines
DOS n' Don'ts -- Part 4
=== == ====== ==== =
Written by Joel Ellis Rea
of Loadstar
Last issue we discussed the format-
ting (NEWing) of a new disk, and the
LOADing and SAVE-ing of BASIC prog-
rams. This time we will cover some
maintenance commands such as how to
remove a program that is no longer
needed, how to change the name of a
program, how to get rid of all un-
closed files on a disk, etc. As al-
ways, we will use the DOS Wedge ver-
sions of disk commands.
Maintenance commands are sent by the
Wedge to the Command Channel of the
disk drive. Without the Wedge, you
would have to type:
OPEN 15,8,15: PRINT#15, 'command':
CLOSE 15
to send the command string 'command'
to the disk drive. With the Wedge,
you need only type:
@command
or
>command
For our examples, we will use the '@'
prefix. It does not need the SHIFT
key like the '>' prefix, but you may
use whichever you prefer.
The NEW command discussed last issue
is an example of a maintenance com-
mand. Such commands are performed by
the disk drive itself. The 64 only
passes the command from you to the
drive.
The simplest of the maintenance com-
mands is the Display Disk Status com-
mand. This is actually a Wedge spe-
cial, since you cannot just print this
command to the Command Channel. To do
a Display Disk Status, just type:
@
and hit RETURN. It's that simple. If
all is well, the screen will display:
@ <-- You typed this
00, OK,00,00 <-- Computer says!
This means that the Disk Status is OK!
If the red drive light is flashing
steadily, that means an error condi-
tion. The disk drive 'knows' what the
error is, but since it does not con-
trol the serial bus, it cannot 'speak'
unless 'spoken to'. By typing '@',
you request the current status of the
drive. An example of an error:
/BADPRG <-- LOAD 'BADPRG'
SEARCHING FOR BADPRG
LOADING <-- Drive 'clatters'!
READY. <-- Red light blinking!
@ <-- Display Disk Status
20, READ ERROR,17,12
The first number displayed, in this
case 20, is the Error Code. The text
following the Error Code is a brief
description of the error, called the
Error Message. The second number is
(usually) the track on which the er-
ror occurred, called the Error Track,
and the last number is the sector of
the Error Track on which the error oc-
curred, the Error Sector. So this
response means that there was a READ
ERROR code 20 while trying to read
sector 12 of track 17. Once the Disk
Status has been displayed, the red
light stops flashing and further Disk
Status commands will return the OK
message until the next error.
<Continued in Part 5>
--------------------------------------